<template>
	<view style="background: rgb(242, 242, 242);min-height: 100vh;">
		<view class=""
			style="background:#95A3CD;padding: 10rpx 20rpx;color: #4265C5;font-size: 30rpx;letter-spacing: 3rpx">
			主营类目和店铺名称开店后均可再次修改</view>
			
		
		<view class="card" style="display: flex;flex-direction: column;">
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">姓名</view>
				  <tn-input v-model="name" placeholder="请输入姓名" />
			</view>
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">手机号</view>
				 <tn-input v-model="name" placeholder="请输入手机号"/>
			</view>
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view  class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">店铺地址</view>
				 <tn-input v-model="name" placeholder="请输入店铺地址"/>
			</view>
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view  class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">公司名称</view>
				 <tn-input v-model="name" placeholder="请输入公司名称"/>
			</view>
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view  class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">统一社会信用代码</view>
				 <tn-input v-model="name"/>
			</view>
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view  class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">营业执照照片</view>
				  <tn-image-upload :action="action" :fileList="fileList"  maxCount="1"></tn-image-upload>
			</view>
			<view class="tn-width-full tn-flex tn-flex-col-center">
				<view  class="tn-text-md" style="padding: 0 30rpx 0 10rpx;">法人身份证信息‌</view>
			<tn-image-upload :action="action" :fileList="fileList"  maxCount="1"></tn-image-upload>
			</view>
		</view>
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
			
			
			
			
			
		<view class="card" style="" @click="show=true">
			<view class="tn-text-md" style="width: 160rpx">主营类目</view>
			<view class="" style="display: flex;flex: 1;align-items: center;justify-content: space-between;">
				<view class="" v-if="detail && detail[0]" style="display: flex;align-items: center;">
					<view class="">{{detail[0].label}}</view>
					<text class="tn-icon-right"></text>
					<view class="">{{detail[1].label}}</view>
				</view>
				<view class="" v-else>

				</view>
				<text class="tn-icon-right"></text>
			</view>
		</view>

		<view class="cardFooter">
			<view class="tn-text-md" style="width: 160rpx">店铺命名</view>
			<view class="" style="display: flex;justify-content: space-between;margin-top: 30rpx;">
				<view class="" style="background: rgb(247, 247, 247);width: 60%;padding: 0rpx 20rpx;">
					<tn-input class="tn-text-md" v-model="value" style="width: 100%;" />
				</view>
				<view class=""
					style="display: flex;align-items: center;justify-content: space-between;background: rgb(247, 247, 247);width: 37%;padding: 0rpx 20rpx;"
					@click="showSet=true">
					<view class="tn-text-md">{{selector[selectorIndex]}}</view>
					<text class="tn-icon-right"></text>
				</view>
			</view>
		</view>

		<view class="" style="display: flex;font-size: 28rpx;margin: 50rpx 30rpx;">
			<view class="" @click="currentRadil(disbed)">
				<image v-if="disbed==false" src="https://oss.taoding1688.com/static/uniapp/static/commission/radio.png" mode="widthFix"
					style="width: 40rpx;"></image>
				<image v-else src="https://oss.taoding1688.com/static/uniapp/static/commission/radiob.png" mode="widthFix" style="width: 40rpx;"></image>
			</view>
			<view class="">
				我已阅读并同意<text style="color: #4265C5;">《店铺服务协议》</text>
			</view>

		</view>
		<view class=""
			style="background: #fff;position: fixed;bottom: 0;padding: 30rpx 20rpx;display: flex;justify-content: space-around;width: 100%;">
			<view class="" style="padding: 20rpx 80rpx;border: 2rpx solid rgb(218, 218, 218);color: rgb(91, 91, 91);"
				@click="back">上一步</view>
			<view class="" style="padding: 20rpx 80rpx;background: rgb(56, 104, 250);color: #fff;" @click="next">下一步
			</view>
		</view>






		<tn-select v-model="show" mode="multi-auto" :list="list" @confirm="confirm"></tn-select>

		<tn-picker mode="selector" v-model="showSet" :defaultSelector="[selectorIndex]" :range="selector"
			@confirm="confirmSet"></tn-picker>

	</view>

</template>

<script>
	export default {
		data() {
			return {
				 // 演示地址，请勿直接使用
				        action: 'http://www.example.com/upload_image',
				        fileList: [{
				          url: 'http://www.example.com/tuniao.jpg',
				        }],
				disbed: false,
				selector: ['店铺', '小铺', '工作室', '经营部'],
				selectorIndex: 0,
				value: '1jd 62efe2388',
				show: false,
				showSet: false,
				detail: {},
				list: [{
						value: 1,
						label: '珠宝首饰',
						children: [{
								value: 2,
								label: '银饰'
							},
							{
								value: 3,
								label: '翡翠'
							},
							{
								value: 3,
								label: '水晶玛瑙'
							},
							{
								value: 3,
								label: '彩宝'
							}
						]
					},
					{
						value: 8,
						label: '手机通讯',
						children: [{
							value: 9,
							label: '对讲机'
						}, {
							value: 10,
							label: '手机'
						}, {
							value: 11,
							label: '运营商'
						}]
					},
					{
						value: 12,
						label: '粮油调味',
						children: [{
							value: 13,
							label: '南北干货'
						}]
					}
				]

			}
		},
		methods: {
			confirm(e) {
				this.detail = e
			},
			confirmSet(e) {
				this.selectorIndex = e
			},
			currentRadil(disbed) {
				this.disbed = !disbed
			},
			back() {
				uni.navigateBack({
					delta: 1
				})
			},
			next() {
				uni.navigateTo({
					url: '/discountPage/shopUserDetail/shopUserDetail'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.card {
		display: flex;
		justify-content: space-between;
		background: #fff;
		margin: 20rpx 20rpx;
		padding: 25rpx 20rpx;
		align-items: center;
		border-radius: 15rpx;
	}


	.cardFooter {
		background: #fff;
		margin: 20rpx 20rpx;
		padding: 25rpx 20rpx;
		border-radius: 15rpx;
	}
</style>